/*
 * @Author: tianbp
 * @Date: 2023-09-12 13:29:29
 * @LastEditTime: 2023-09-13 21:14:30
 * @FilePath: \hiSportWeb\src\router\config.js
 * @Description: 
 * 
 */
/*
 * @Author: tianbp
 * @Date: 2023-09-12 13:29:29
 * @LastEditTime: 2023-09-12 23:08:51
 * @FilePath: \vue-antd-admin\src\router\config.js
 * @Description: 
 * 
 */
import TabsView from '@/layouts/tabs/TabsView'

// 路由配置
const options = {
  routes: [
    {
      path: '/login',
      name: '登录页',
      component: () => import('@/pages/login')
    },
    {
      path: '*',
      name: '404',
      component: () => import('@/pages/exception/404'),
    },
    {
      path: '/403',
      name: '403',
      component: () => import('@/pages/exception/403'),
    },
    {
      path: '/',
      name: '首页',
      component: TabsView,
      redirect: '/login',
      children: [
        {
          path: 'demo',
          name: '演示页',
          meta: {
            icon: 'file-ppt'
          },
          component: () => import('@/pages/demo')
        },
        {
          path: 'parent1',
          name: '父级路由1',
          meta: {
            icon: 'dashboard',
          },
          component: () => import('@/pages/demo/BlankView'),
          children: [
            {
              path: 'demo1',
              name: '演示页面1',
              component: () => import('@/pages/demo'),
            }
          ]
        },
        {
          path: 'test1',
          name: '测试菜单1',
          meta: {
            icon: 'dashboard',
          },
          component:() => import('@/pages/test1/test1.vue'),
          children: [
            {
              path: 'testList',
              name: '演示页面1',
              component: () => import('@/pages/test1/testList.vue'),
            }
          ]
        },
        {
          path: 'test2',
          name: '测试菜单2',
          meta: {
            icon: 'dashboard',
          },
          component:() => import('@/pages/test2/test2.vue'),
          children: [
            {
              path: 'test2List',
              name: '演示页面1',
              component: () => import('@/pages/test2/test2List.vue'),
            }
          ]
        },
        {
          path: 'exception',
          name: '异常页',
          meta: {
            icon: 'warning',
          },
          component: () => import('@/pages/exception/BlankView'),
          children: [
            {
              path: '404',
              name: 'Exp404',
              component: () => import('@/pages/exception/404')
            },
            {
              path: '403',
              name: 'Exp403',
              component: () => import('@/pages/exception/403')
            },
            {
              path: '500',
              name: 'Exp500',
              component: () => import('@/pages/exception/500')
            }
          ]
        },
        {
          name: '验权页面',
          path: 'auth/demo',
          meta: {
            icon: 'file-ppt',
            authority: {
              permission: 'form',
              role: 'manager'
            },
            component: () => import('@/pages/demo')
          }
        }
      ]
    }
  ]
}

export default options
